package com.xuexi.api;

import com.easygo.utils.PageUtils;
import com.xuexi.easygo.pojo.ItemCat;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("easygo-itemcat-service")
public interface ItemCatClient {

    @RequestMapping("itemcat_page")
    PageUtils<ItemCat> itemcat_page(@RequestParam(value = "pageIndex",defaultValue = "1",required = false) Integer pageIndex,
                                    @RequestParam(value = "pageSize",defaultValue = "5",required = false) Integer pageSize,
                                    @RequestParam(value = "parent_id",defaultValue = "0",required = false) Integer parent_id);

    @RequestMapping("/itemcat_getById")
    ItemCat getItemCatById(@RequestParam(value = "id") Integer id);

    @RequestMapping("addItemCat")
    Integer addItemCat(@RequestBody ItemCat itemCat);

//    @RequestMapping("updateItemCat")
//    Integer updateItemCat(ItemCat itemCat);
}
